<template>
  <div class="index">
    <!-- 头部   第一行-->
    <header>
      <!-- 扫码 -->
      <div class="sweep"><img src="@/assets/indeximg/sweep.png" alt="" /></div>
      <span>测一测</span>
      <!-- 搜索框 -->
      <div class="input">
        <van-search
          shape="round"
          background="transparent"
          placeholder="热搜产品：碧柔"
        />
      </div>
      <!-- 签到 -->
      <div class="signin">
        <img src="@/assets/indeximg/signin.png" alt="" />
      </div>
      <!-- 通知 -->
      <div class="bell"><img src="@/assets/indeximg/bell.png" alt="" /></div>
    </header>

    <!-- 分割线   第二行-->
    <div class="hr"></div>
    <div class="main">
      <!-- 天气    第三行-->
      <div class="weather">
        <img src="@/assets/indeximg/wrapper.png" alt="" />
        <!-- 多云 -->
        <div class="cloudy">
          <img src="@/assets/indeximg/cloudy.png" alt="" />
        </div>
        <!-- 文字 -->
        <div class="word">
          <p>今天的保湿和防晒指数, 点我一下就告诉你</p>
          <span>需要允许位置权限哦</span>
        </div>
        <!-- 箭头 -->
        <div class="arrows">
          <img src="@/assets/indeximg/arrows.png" alt="" />
        </div>
      </div>

      <!-- 卡通   第四行 -->
      <div class="cartoon">
        <img class="adopt" src="@/assets/indeximg/adopt.png" alt="" />
        <img class="cat" src="@/assets/indeximg/cartoon.png" alt="" />
      </div>

      <!-- 导航 -->
      <nav>
        <ul>
          <li @click="gotoproduct">
            <img src="@/assets/indeximg/product.png" alt="" />
            <span>查产品</span>
          </li>
          <li @click="gotohufubang">
            <img src="@/assets/indeximg/skin.png" alt="" />
            <span>护肤榜</span>
          </li>
          <li @click="gotobeauty">
            <img src="@/assets/indeximg/beauty.png" alt="" />
            <span>美妆榜</span>
          </li>
          <li @click="gotobrand">
            <img src="@/assets/indeximg/brand.png" alt="" />
            <span>品牌库</span>
          </li>
          <li>
            <img src="@/assets/indeximg/boon.png" alt="" />
            <span>福利情报局</span>
          </li>
        </ul>
      </nav>
    </div>
  </div>
</template>

<script>
import { Search } from "vant";
import "vant/es/search/style";
export default {
  data() {
    return {};
  },

  components: {
    VanSearch: Search,
  },

  computed: {},

  mounted() {},

  methods: {
    gotoproduct() {
      this.$router.push("/product/");
    },
    gotobrand() {
      this.$router.push("/home/index/brand/");
    },
    gotohufubang() {
      this.$router.push("/home/hufubang/");
    },
    gotobeauty() {
      this.$router.push("/home/beauty/");
    },
  },
};
</script>

<style lang="less" scoped>
@import "../../assets/css/var.less";

//页面
.index {
  //头部
  header {
    position: fixed;
    background: white;
    z-index: 999;
    height: 130px;
    line-height: 130px;
    display: flex;
    align-items: center;
    .between ();
    padding: 0px 30px;

    //扫码
    .sweep {
      img {
        width: 48px;
        height: 46px;
        margin-top: 45px;
      }
    }
    span {
      width: 96px;
      height: 31px;
      line-height: 31px;
      font-size: 32px;
      .font_f_w ();
      color: #000000;
      margin: 0 20px 0 15px;
    }
    //搜索框
    :deep(.van-search) {
      width: 340px;
      height: 56px;
    }
    :deep(.van-field__control) {
      margin-left: 10px;
      height: 56px;
      font-size: 26px;
    }
    :deep(.van-field__left-icon) {
      line-height: 56px;
      font-size: 26px;
      margin-left: 10px;
    }
    :deep(.van-field__left-icon .van-icon) {
      font-size: 30px;
    }

    //签到
    .signin {
      margin: 25px 24px 0 20px;
      img {
        height: 65px;
        width: 65px;
      }
    }
    //通知
    .bell {
      margin: 20px 0 9px 0;
      img {
        height: 46px;
        width: 40px;
      }
    }
  }
  //分割线
  .hr {
    position: fixed;
    top: 102px;
    width: 100%;
    height: 30px;
    background: white;
    .border-bottom();
  }

  .main {
    padding-top: 150px;

    //天气
    .weather {
      position: relative;
      img {
        width: 100%;
        height: 103px;
      }
      .cloudy img {
        height: 78px;
        width: 90px;
        position: absolute;
        top: 16px;
        left: 23px;
      }
      .word {
        font-size: 24px;
        .font_f_w ();
        position: absolute;
        top: 24px;
        left: 152px;
        p {
          height: 25px;
          color: #64c8c8;
          margin-bottom: 13px;
        }
        span {
          display: block;
          height: 23px;
          color: #b5b5b5;
        }
      }

      .arrows img {
        width: 52px;
        height: 37px;
        position: absolute;
        top: 38px;
        right: 54px;
      }
    }

    //卡通
    .cartoon {
      padding-left: 31px;
      .adopt {
        width: 448px;
        height: 256px;
      }
      .cat {
        width: 244px;
        height: 266px;
      }
    }

    //导航
    nav {
      ul {
        .between ();
        padding: 24px 30px 10px 30px;
        li {
          height: 153x;
          width: 138px;
          text-align: center;

          img {
            height: 114px;
            width: 146px;
          }
          span {
            display: block;
            margin-left: 8px;
            height: 23px;
            font-size: 24px;
            .font_f_w ();
            color: #717171;
          }
        }
      }
    }
  }
}
</style>
